<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: wupy
 * @LastEditTime: 2022-01-09 17:18:25
-->
<template>
  <!--1. 容器 -->
  <div ref="bottom3_container" id="container" style="height: 95%"></div>
</template>

<script>
import {Bar} from '@antv/g2plot';
export default {
  data (){
    return{
       dataArr:[ { year: '6月', value: 38 },
  { year: '7月', value: 52 },
  { year: '8月', value: 61 },
  { year: '9月', value: 145 },
  { year: '10月', value: 48 }
    ]
     }
  },
created(){
  
},
mounted(){
this.initChart()
},
methods:{
initChart(){
  const bar = new Bar(this.$refs.bottom3_container,{
    data:this.dataArr,
  xField: 'value',
  yField: 'year',
  seriesField: 'year',
  legend: {
    position: 'top-left',
  },
});

bar.render();
}
}
}
</script>

<style scoped>

</style>